package com.example.gitproject.Entity;

import java.util.ArrayList;

public class Data {

    //封装getData()方法
    public static ArrayList<Book> getData(){
        // 方法修饰符   需要返回的数据类型  方法名称(参数){ }
        //  ArrayList<Book>    =》  []      <>泛型  指定数据类型来源     避免上下文数据类型不一致
        ArrayList<Book> books = new ArrayList<>();
//        books.add(new Book(1,"楚辞","屈原","中国文联出版社","0"));
//        books.add(new Book(2,"纳兰词","纳兰性德","中国文联出版社","1"));
//        books.add(new Book(3,"西游记","吴承恩","中国文联出版社","2"));
        return books;
    }



}
